← Back
Editing: query_cache_wlock_invalidate_func.result
** Setup ** ** Connecting con0 using root ** ** Connecting con1 using root ** ** Connection con0 ** SET @start_global_value = @@GLOBAL.query_cache_wlock_invalidate; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. SET @start_session_value = @@SESSION.query_cache_wlock_invalidate; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. SET @old_cache_size = @@GLOBAL.query_cache_size; Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. SET @old_cache_type = @@GLOBAL.query_cache_type; Warnings: Warning 1287 '@@query_cache_type' is deprecated and will be removed in a future release. CREATE TABLE t1(id int, value varchar(10)); INSERT INTO t1 VALUES(1, 'val1'); INSERT INTO t1 VALUES(2, 'val2'); INSERT INTO t1 VALUES(3, 'val3'); SET GLOBAL query_cache_size = 131072; Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. FLUSHING CACHE SET GLOBAL query_cache_size = 0; Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. SET GLOBAL query_cache_size = 131072; Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. SET GLOBAL query_cache_type = ON; Warnings: Warning 1287 '@@query_cache_type' is deprecated and will be removed in a future release. Testing for value ON ** Connection con0 ** SET SESSION query_cache_wlock_invalidate = ON; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. ** Connection con1 ** SET SESSION query_cache_wlock_invalidate = ON; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. '#----------------------------FN_DYNVARS_136_01--------------#' Testing for cache invalidation SELECT * FROM t1; id value 1 val1 2 val2 3 val3 SHOW STATUS LIKE 'Qcache_queries_in_cache'; Variable_name Value Qcache_queries_in_cache 1 1 Expected LOCK TABLE t1 WRITE; UNLOCK TABLES; SHOW STATUS LIKE 'Qcache_queries_in_cache'; Variable_name Value Qcache_queries_in_cache 0 0 Expected '#----------------------------FN_DYNVARS_136_02-----------------------#' SELECT * FROM t1; SHOW STATUS LIKE 'Qcache_queries_in_cache'; ** Connection con1 ** SELECT * FROM t1; id value 1 val1 2 val2 3 val3 ** Connection con0 ** LOCK TABLE t1 WRITE; ** Connection con1 ** ** Asynchronous Execution ** SELECT * FROM t1; ** Connection con0 ** wait until table is locked UNLOCK TABLES; ** Connection con1 ** ** Asynchronous Result ** id value 1 val1 2 val2 3 val3 Testing for value OFF ** Connection con0 ** SET SESSION query_cache_wlock_invalidate = OFF; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. ** Connection con1 ** SET SESSION query_cache_wlock_invalidate = OFF; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. '#----------------------------FN_DYNVARS_136_03------------------#' Testing for cache invalidation SELECT * FROM t1; id value 1 val1 2 val2 3 val3 SHOW STATUS LIKE 'Qcache_queries_in_cache'; Variable_name Value Qcache_queries_in_cache 1 1 Expected LOCK TABLE t1 WRITE; UNLOCK TABLES; SHOW STATUS LIKE 'Qcache_queries_in_cache'; Variable_name Value Qcache_queries_in_cache 1 1 Expected '#----------------------------FN_DYNVARS_136_04---------------------#' SELECT * FROM t1; id value 1 val1 2 val2 3 val3 SHOW STATUS LIKE 'Qcache_queries_in_cache'; Variable_name Value Qcache_queries_in_cache 1 1 Expected ** Connection con1 ** SELECT * FROM t1; id value 1 val1 2 val2 3 val3 ** Connection con0 ** LOCK TABLE t1 WRITE; ** Connection con1 ** ** Should not be blocked ** SELECT * FROM t1; id value 1 val1 2 val2 3 val3 SELECT * FROM t1; id value 1 val1 2 val2 3 val3 SELECT * FROM t1; id value 1 val1 2 val2 3 val3 ** Connection con0 ** UNLOCK TABLES; ** Connection con1 ** '#----------------------------FN_DYNVARS_136_05------------------------#' SET GLOBAL query_cache_wlock_invalidate = OFF; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. ** Connecting con_int1 using root ** ** Connection con_int1 ** SELECT @@SESSION.query_cache_wlock_invalidate; @@SESSION.query_cache_wlock_invalidate 0 Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. Expected Value : 0 / OFF; SET SESSION query_cache_wlock_invalidate = ON; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. ** Connecting con_int2 using root ** ** Connection con_int2 ** SELECT @@SESSION.query_cache_wlock_invalidate; @@SESSION.query_cache_wlock_invalidate 0 Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. Expected Value : 0 / OFF; SET SESSION query_cache_wlock_invalidate = OFF; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. ** Connection con_int1 ** SELECT @@SESSION.query_cache_wlock_invalidate; @@SESSION.query_cache_wlock_invalidate 1 Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. Expected Value : 1 / ON; ** Connection con_int2 ** SELECT @@SESSION.query_cache_wlock_invalidate; @@SESSION.query_cache_wlock_invalidate 0 Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. Expected Value : 0 / OFF; SELECT @@GLOBAL.query_cache_wlock_invalidate; @@GLOBAL.query_cache_wlock_invalidate 0 Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. Expected Value : 0 / OFF; ** Connection default ** Disconnecting Connections con_int1, con_int2 CLEANUP ** Connection con0 ** SET @@GLOBAL.query_cache_wlock_invalidate = @start_global_value; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. SET @@SESSION.query_cache_wlock_invalidate = @start_session_value ; Warnings: Warning 1287 '@@query_cache_wlock_invalidate' is deprecated and will be removed in a future release. SET @@GLOBAL.query_cache_size = @old_cache_size; Warnings: Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. SET @@GLOBAL.query_cache_type = @old_cache_type; Warnings: Warning 1287 '@@query_cache_type' is deprecated and will be removed in a future release. ** Connection default ** Disconnecting Connections con0, con1 DROP TABLE t1;
Save File
Cancel